package com.dcy.znoa.domain.conference;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 会议
 * @author chenjie
 *
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ConferenceVo {
	
    Long confId;
	
    Date createTime;
        
	String conferSubject;
		
	Date startTime;
	 
	Date endTime;
	
	String conferName; //会议室名称
	
    String conferAddress;
    
    Integer operAmount;   //参会人数

    
    public static Map<String, Object> toMap(ConferenceVo conferenceVo) {
		Map<String, Object> map  = new HashMap<String, Object>();
        map.put("confId",conferenceVo.getConfId());
        map.put("createTime",conferenceVo.getCreateTime());
        map.put("conferSubject",conferenceVo.getConferSubject());
        map.put("startTime",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(conferenceVo.getStartTime()));  
        map.put("endTime",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(conferenceVo.getEndTime()));
        map.put("conferAddress",conferenceVo.getConferAddress());       
        map.put("operAmount",conferenceVo.getOperAmount());
        
        return  map;
	}
}
